home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacFormat España 15
/
macformat_15.iso
/
C de cerca
/
Codewarrior Lite
/
MacOS Support
/
Headers
/
ANSI Headers
/
typeinfo
< prev
next >
Wrap
Text File
|
1995-12-29
|
2KB
|
66 lines
/************************************************************************/
/* Project...: Standard C++ Library */
/* Name......: typeinfo */
/* Purpose...: RTTI handling */
/* Copyright.: ©Copyright 1993-95 by metrowerks inc */
/************************************************************************/
#ifndef _TYPEINFO_
#define _TYPEINFO_
#ifndef _STDEXCEPT_
#include <stdexcept>
#endif
#if __MWERKS__
#pragma options align=mac68k
#if __CFM68K__ && __USING_IMPORTED_ANSI__
#pragma import on
#endif
#endif
class type_info {
const char *tname;
const void *tbase;
public:
// virtual ~type_info();
char operator==(const type_info&) const;
char operator!=(const type_info&) const;
char before(const type_info&) const;
const char* name() const;
private:
type_info(const type_info&);
type_info& operator=(const type_info&);
};
class bad_cast : public exception {
public:
bad_cast() throw() {}
bad_cast(const bad_cast&) throw() {}
bad_cast& operator=(const bad_cast&) throw() { return *this; }
// virtual ~bad_cast() throw();
virtual const char* what() const /*throw()*/;
};
class bad_typeid : public exception {
public:
bad_typeid() throw() {}
bad_typeid(const bad_typeid&) throw() {}
bad_typeid& operator=(const bad_typeid&) throw() { return *this; }
// virtual ~bad_typeid() throw();
virtual const char* what() const /*throw()*/;
};
#if __MWERKS__
#if __CFM68K__ && __USING_IMPORTED_ANSI__
#pragma import reset
#endif
#pragma options align=reset
#endif
#endif